// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addUserTrainingPlanRelation POST /api/userTrainingPlanRelation/add */
export async function addUserTrainingPlanRelationUsingPost(
  body: API.UserTrainingPlanRelationAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/userTrainingPlanRelation/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** dayNewlyAddedUserTrainingPlanRelation POST /api/userTrainingPlanRelation/day/newly/added */
export async function dayNewlyAddedUserTrainingPlanRelationUsingPost(options?: {
  [key: string]: any;
}) {
  return request<API.BaseResponseListDataGroupByDateDTO_>(
    '/api/userTrainingPlanRelation/day/newly/added',
    {
      method: 'POST',
      ...(options || {}),
    },
  );
}

/** deleteUserTrainingPlanRelation POST /api/userTrainingPlanRelation/delete */
export async function deleteUserTrainingPlanRelationUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/userTrainingPlanRelation/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** editUserTrainingPlanRelation POST /api/userTrainingPlanRelation/edit */
export async function editUserTrainingPlanRelationUsingPost(
  body: API.UserTrainingPlanRelationEditRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/userTrainingPlanRelation/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getUserTrainingPlanRelationVOById GET /api/userTrainingPlanRelation/get/vo */
export async function getUserTrainingPlanRelationVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserTrainingPlanRelationVOByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseUserTrainingPlanRelationVO_>(
    '/api/userTrainingPlanRelation/get/vo',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** listUserTrainingPlanRelationByPage POST /api/userTrainingPlanRelation/list/page */
export async function listUserTrainingPlanRelationByPageUsingPost(
  body: API.UserTrainingPlanRelationQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageUserTrainingPlanRelation_>(
    '/api/userTrainingPlanRelation/list/page',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** listUserTrainingPlanRelationVOByPage POST /api/userTrainingPlanRelation/list/page/vo */
export async function listUserTrainingPlanRelationVoByPageUsingPost(
  body: API.UserTrainingPlanRelationQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageUserTrainingPlanRelationVO_>(
    '/api/userTrainingPlanRelation/list/page/vo',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** listMyUserTrainingPlanRelationVOByPage POST /api/userTrainingPlanRelation/my/list/page/vo */
export async function listMyUserTrainingPlanRelationVoByPageUsingPost(
  body: API.UserTrainingPlanRelationQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageUserTrainingPlanRelationVO_>(
    '/api/userTrainingPlanRelation/my/list/page/vo',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** updateUserTrainingPlanRelation POST /api/userTrainingPlanRelation/update */
export async function updateUserTrainingPlanRelationUsingPost(
  body: API.UserTrainingPlanRelationUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/userTrainingPlanRelation/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
